package com.gblw.rjkf.pj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gblw.rjkf.pj.entity.SysMenus;
import com.gblw.rjkf.pj.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (SysMenus)表数据库访问层
 *
 * @author makejava
 * @since 2024-09-11 20:58:21
 */
@Mapper
public interface SysMenusMapper extends BaseMapper<SysMenus> {

    @Select("SELECT * FROM sys_menus")
    List<SysMenus> getAllMenus();


    @Select("SELECT * FROM sys_role where id =(select  role_id from sys_user where id = #{id})")
    SysRole getRoleById(int id);
}


